libkovan
1
The kovan standard library
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
motors.h
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright 2012 KISS Institute for Practical Robotics *
3
* *
4
* This file is part of libkovan. *
5
* *
6
* libkovan is free software: you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation, either version 2 of the License, or *
9
* (at your option) any later version. *
10
* *
11
* libkovan is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with libkovan. Check the LICENSE file in the project root. *
18
* If not, see <http://www.gnu.org/licenses/>. *
19
**************************************************************************/
20
29
#ifndef _MOTORS_H_
30
#define _MOTORS_H_
31
32
#include "
export.h
"
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
41
EXPORT_SYM
int
get_motor_position_counter
(
int
motor
);
42
46
EXPORT_SYM
void
clear_motor_position_counter
(
int
motor
);
47
51
EXPORT_SYM
int
move_at_velocity
(
int
motor
,
int
velocity);
52
57
EXPORT_SYM
int
mav
(
int
motor
,
int
velocity);
58
59
EXPORT_SYM
int
move_to_position
(
int
motor
,
int
speed,
int
goal_pos);
60
65
EXPORT_SYM
int
mtp
(
int
motor
,
int
speed,
int
goal_pos);
66
67
EXPORT_SYM
int
move_relative_position
(
int
motor
,
int
speed,
int
delta_pos);
68
73
EXPORT_SYM
int
mrp
(
int
motor
,
int
speed,
int
delta_pos);
74
78
EXPORT_SYM
void
set_pid_gains
(
int
motor
,
short
p,
short
i,
short
d,
short
pd,
short
id
,
short
dd);
79
83
EXPORT_SYM
void
get_pid_gains
(
int
motor
,
short
*p,
short
*i,
short
*d,
short
*pd,
short
*
id
,
short
*dd);
84
88
EXPORT_SYM
int
freeze
(
int
motor
);
89
93
EXPORT_SYM
int
get_motor_done
(
int
motor
);
94
98
EXPORT_SYM
void
block_motor_done
(
int
motor
);
99
104
EXPORT_SYM
void
bmd
(
int
motor
);
105
109
EXPORT_SYM
int
setpwm
(
int
motor
,
int
pwm);
110
114
EXPORT_SYM
int
getpwm
(
int
motor
);
115
121
EXPORT_SYM
void
fd
(
int
motor
);
122
128
EXPORT_SYM
void
bk
(
int
motor
);
129
133
EXPORT_SYM
void
motor
(
int
motor
,
int
percent);
134
140
EXPORT_SYM
void
off
(
int
motor
);
141
147
EXPORT_SYM
void
alloff
();
148
153
EXPORT_SYM
void
ao
();
154
155
156
#ifdef __cplusplus
157
}
158
#endif
159
160
161
#endif
include
kovan
motors.h
Generated on Mon Aug 19 2013 00:33:00 for libkovan by
1.8.4